package com.wish.base.service.impl;

import com.alibaba.fastjson.JSON;
import com.wish.base.dto.CwPayOrderDto;
import com.wish.base.dto.CwReceiptPlanDto;
import com.wish.base.entity.CwPayOrder;
import com.wish.base.entity.CwReceiptPlan;
import com.wish.base.mapper.CwReceiptPlanMapper;
import com.wish.base.service.ICwReceiptPlanService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wish.base.vo.RequestRemainingLeavingBillVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 收款计划表 服务实现类
 * </p>
 *
 * @author group02
 * @since 2022-05-23
 */
@Service
@Slf4j
public class CwReceiptPlanServiceImpl extends ServiceImpl<CwReceiptPlanMapper, CwReceiptPlan> implements ICwReceiptPlanService {

    @Override
    public List<CwReceiptPlan> listShow(CwReceiptPlanDto cwReceiptPlanDto) {
        return getBaseMapper().listShow(cwReceiptPlanDto);
    }

    @Override
    public List<CwReceiptPlan> sumList(CwReceiptPlanDto dto) {
        return getBaseMapper().sumList(dto);
    }

    @Autowired
    CwReceiptPlanMapper cwReceiptPlanMapper;

    @Override
    public List<CwReceiptPlan> selectRemainingLeaseBill(RequestRemainingLeavingBillVo requestRemainingLeavingBill) {
        log.info("selectRemainingLeaseBill查询剩余租期账单Start...！");
        log.info("----selectRemainingLeaseBill入参：{}", JSON.toJSONString(requestRemainingLeavingBill));
        List<CwReceiptPlan> billList = cwReceiptPlanMapper.selectRemainingLeaseBill(requestRemainingLeavingBill);
        log.info("selectRemainingLeaseBill查询剩余租期账单End...！");
        return billList;
    }

}
